package cn.dfun.demo.scdemo.ali.seata.controller;

import cn.dfun.demo.scdemo.ali.seata.domain.Order;
import cn.dfun.demo.scdemo.ali.seata.service.OrderService;
import cn.dfun.demo.scdemo.common.entity.CommonResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class OrderController {
    @Resource
    private OrderService orderService;

    @GetMapping("/order/create")
    public CommonResult create(Order order) {
        orderService.create(order);
        return CommonResult.success();
    }
}
